Don't crash if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)
authorMatthias Clasen <mclasen@redhat.com>
Fri, 2 Dec 2005 19:57:36 +0000 (19:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 2 Dec 2005 19:57:36 +0000 (19:57 +0000)
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash
if mime_type is NULL.  (#322998, Sadrul Habib Chowdhury)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkfilesystemunix.c

index 09fc227b73ea5d045456c91a9ccf98571c257a65..c9ae73261a12259ef405ce20ec515818a23b901b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-02  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash
+       if mime_type is NULL.  (#322998, Sadrul Habib Chowdhury)
+
 2005-12-02  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtkmenu.c: applied modified patch from maemo-gtk which
index 09fc227b73ea5d045456c91a9ccf98571c257a65..c9ae73261a12259ef405ce20ec515818a23b901b 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-02  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash
+       if mime_type is NULL.  (#322998, Sadrul Habib Chowdhury)
+
 2005-12-02  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtkmenu.c: applied modified patch from maemo-gtk which
index 9525efcb73c5cc6682638640941eaa96fc0c2ed5..ccc541a3a263b81f941c6eca90dee5f33cf17c73 100644 (file)
@@ -1284,6 +1284,9 @@ get_icon_for_mime_type (GtkWidget  *widget,
   GString *icon_name;
   GdkPixbuf *pixbuf;
 
+  if (!mime_type)
+    return NULL;
+
   separator = strchr (mime_type, '/');
   if (!separator)
     return NULL; /* maybe we should return a GError with "invalid MIME-type" */